package com.eralink.unionuhfreader.http;

public class Result<T> {
    public static final String SUCCESSFUL_CODE = "000000";
    public static final String SUCCESSFUL_MESG = "处理成功";

    private String code;

    private String msg;

    //private Instant time;

    private T data;

    public Result() {

    }
    public  boolean isSucess(){
        if (code!=null&&code.equals("0")){
            return true;
        }
        return false;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String mesg) {
        this.msg = mesg;
    }

    /* public Instant getTime() {
        return time;
    }

    public void setTime(Instant time) {
        this.time = time;
    }*/

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
